package com.cn.mmd.service;

import com.cn.mmd.model.*;

import java.util.List;

/**
 * Created by Administrator on 2016/6/24 0024.
 */

public interface TeacherService {
    int insertSelective(Teacher record);

    Teacher selectByidRid(String teacherid);

    List<Teacher> selectByAllExT(String s);

    int insertSelective(TeacherData record);

    int updateByPrimaryKeySelective(TeacherStatistics record);

    TeacherStatistics selectByPrimaryKey(String teacherSid);

    List<Teacher> selectByPaging(Teacher teacher);

    int updateByPrimaryKeySelective(Teacher record);

    int deleteByPrimaryKey(String teacherSid);

    Teacher selectByPrimaryKeyo(String teacherid);

    int selectCount(String teacherposition);

    int countLimitNum(Teacher teacher);
    /**
     * 教师端登录
     * @param teacherid
     * @param teacherpassword
     * @return
     */
    TeacherData teacherLogin(String teacherid, String teacherpassword);

    /**
     * 查询当前老师的统计次数
     * @param teacherId
     * @return
     */
    TeacherStatistics selectStatistics(String teacherId);

    /**
     * 修改统计次数
     * @param teacherStatistics
     * @return
     */
    int updateStatistics(TeacherStatistics teacherStatistics);

    /**
     * 添加老师统计
     * @param teacherStatistics
     * @return
     */
    int insertStatistics(TeacherStatistics teacherStatistics);

    /**
     * 通过教师工号查询该教师所有信息
     * @param teacherid
     * @return
     */
    TeacherData selectByTeacherId(String teacherid);

    /**
     * 修改教师信息
     * @param
     * @return
     */
    int updateTeacher(TeacherData teacherData);


    /**
     * 查询老师评价分数及排名
     * @param teacherId
     * @return
     */
    TeacherRanking selectTeacherRanking(String teacherId);

    /**
     * 修改老师评价分数及排名
     * @param teacherRanking
     * @return
     */
    int updateTeacherRanking(TeacherRanking teacherRanking);

    /**
     * 添加老师评价分数及排名
     * @param teacherRanking
     * @return
     */
    int insertTeacherRanking(TeacherRanking teacherRanking);

    /**
     * 查询学校平均分及详情
     * @return
     */
    AvgSchool selectAvgSchool();

    /**
     * 修改学校平均分及详情
     * @param avgSchool
     * @return
     */
    int updateAvgSchool(AvgSchool avgSchool);


    /**
     * 添加学校平均分及详情
     * @param avgSchool
     * @return
     */
    int insertAvgSchool(AvgSchool avgSchool);

    /**
     * 查询老师主表
     * @param teacherId
     * @return
     */
    Teacher serlectTeacher(String teacherId);


    /**
     * 查询学院平均分及详情
     * @return
     */
    AvgCollege selectAvgCollege(String schoolCollegeId);

    /**
     * 修改学院平均分及详情
     * @param avgCollege
     * @return
     */
    int updateAvgCollege(AvgCollege avgCollege);


    /**
     * 添加学院平均分及详情
     * @param avgCollege
     * @return
     */
    int insertAvgCollege(AvgCollege avgCollege);


    /**
     * 查出所有学院的成绩信息
     * @return
     */
    List<AvgCollege> selectAllAvgCollege();




    List<Teacher> selectByName(String teacherName);


    /**
     * 通过教师id查到比该教师得分多的人数
     * @param teacherId
     * @return
     */
    int calculateTeacherRanking(String teacherId);
}


